<?xml version="1.0" encoding="UTF-8"?>
<!--=======================================================================
/// <remarks>
/// Version:
///		- number:	0.0.9	
///		- build:	20070319
///		- status:	live
/// </remarks>
	======================================================================= -->

<!--=======================================================================
	Stylesheet: WebsiteXBlog.xsl
		- Base template to render the email message to html
	=======================================================================	-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" indent="yes" />
	<xsl:variable name="ROOT">http://websitex.umlungu.com/default.aspx?link=</xsl:variable>
<!--=======================
	Match templates section
	======================= -->
	<xsl:template match="/">
		<html>
			<head>
				<title>WebsiteX Comment</title>
				<xsl:call-template name="htmlStyle"/>
			</head>
			<body>
				<xsl:apply-templates select="blogs"/>
			</body>
		</html>
	</xsl:template>
	
	<xsl:template match="blogs">
		<xsl:apply-templates select="blog"/>
	</xsl:template>
	
	<xsl:template match="blog">
		<xsl:variable name="thisid" select="@comment"/>
      
    <p>The following blog comment has been received...</p>
		<div id="comment"><xsl:apply-templates select="comments/comment[@id=$thisid]"/></div>

    <p>Please 
			<a>
				<xsl:attribute name="href">
					<xsl:value-of select="$ROOT"/><xsl:text>blogs_comment_approved</xsl:text>
					<xsl:text>&amp;name=</xsl:text><xsl:value-of select="@space"/>
					<xsl:text>&amp;topic=</xsl:text><xsl:value-of select="@topic"/>
					<xsl:text>&amp;id=</xsl:text><xsl:value-of select="@id"/>
					<xsl:text>&amp;cid=</xsl:text><xsl:value-of select="@comment"/>
					<xsl:text>&amp;blogs=</xsl:text><xsl:value-of select="@id"/>
				</xsl:attribute>
				<xsl:text>click here to approve</xsl:text>
			</a>
		</p>
		<p>Please 
			<a>
				<xsl:attribute name="href">
					<xsl:value-of select="$ROOT"/><xsl:text>blogs_comment_deleted</xsl:text>
					<xsl:text>&amp;name=</xsl:text><xsl:value-of select="@space"/>
					<xsl:text>&amp;topic=</xsl:text><xsl:value-of select="@topic"/>
					<xsl:text>&amp;id=</xsl:text><xsl:value-of select="@id"/>
					<xsl:text>&amp;cid=</xsl:text><xsl:value-of select="@comment"/>
					<xsl:text>&amp;blogs=</xsl:text><xsl:value-of select="@id"/>
				</xsl:attribute>
				<xsl:text>click here to delete</xsl:text>
			</a>
		</p>
	</xsl:template>
	
	<xsl:template match="comments/comment">
		<p><strong>Author:</strong> <xsl:value-of select="author"/></p>
		<p><strong>Title:</strong> <xsl:value-of select="title"/></p>    
		<p><strong>Text:</strong></p>
		<div id="comment_text"><xsl:value-of select="text"/></div>
	</xsl:template>
	

<!--=======================
	Named templates section
	======================= -->
	<xsl:template name="htmlStyle">
		<style type="text/css">
			<xsl:comment>
				<xsl:text disable-output-escaping="yes"><![CDATA[
					body,p,div,ul{color:#333333;font-family:Arial, Helvetica, sans-serif;font-size:12px;}
					body{padding:0px 25px;}
					p{margin-top:25px;}
					li{list-style:none;}
					a{color:#F37321;}
					#hd{text-align:right;}
					#ft{border-top:1px solid #000;margin-top:30px;font-size:10px;}
					.team{color:#F37321;font-size:14px;font-weight:bold;}
					#comment{border:1px solid #000;padding:20px;}
					#comment_text{width:400px;}
				]]></xsl:text>
			</xsl:comment>
		</style>
	</xsl:template>
	
<!--=========================
	Utility templates section
	========================= -->
	
</xsl:stylesheet>